<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/templates/default.xhtml">
            <ui:define name="content">
                <h:form>
                    <h:panelGrid id="panelNewUserParent" columns="2" >
                        <h:panelGrid id="panelNewUserLeft" columns="2" title="#{locale.formUserInfo}" >
                            <f:facet name="header">
                                <h:outputText value="#{locale.formUserInfo}"/>
                             </f:facet>
                            <h:outputLabel value="#{locale.formFirstName}" />
                            <h:inputText value="#{newUser.newUser.firstName}" size="20"  />
                            <h:outputLabel value="#{locale.formLastName}" />
                            <h:inputText value="#{newUser.newUser.lastName}" size="20"  />
                            <h:outputLabel value="#{locale.formEmail}" />
                            <h:inputText value="#{newUser.newUser.email}" size="20"  />
                            <h:outputLabel value="#{locale.formUsername}" />
                            <h:inputText value="#{newUser.newUser.userName}" size="20"  />
                        </h:panelGrid>
                        <h:panelGrid id="panelNewUserRight" columns="2" title="#{locale.formChooseRoles}" >
                            <f:facet name="header">
                                <h:outputText value="#{locale.formChooseRoles}"/>
                            </f:facet>
                            <h:selectManyCheckbox value="#{newUser.newUser.roles}" layout="pageDirection">
                              <f:selectItem itemLabel="#{locale.formSysadmin}" itemValue="sysadmin" />
                              <f:selectItem itemLabel="#{locale.formAdminresource}" itemValue="adminresource" />
                              <f:selectItem itemLabel="#{locale.formTeacher}" itemValue="teacher" />
                              <f:selectItem itemLabel="#{locale.formStudyadmin}" itemValue="studyadmin" />
                            </h:selectManyCheckbox>
                        </h:panelGrid>
                    </h:panelGrid>
                    <h:commandButton value="#{locale.buttonAddUser}" action="#{newUser.executeNewUser}" />
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

